import { Button, Form, Input, NavBar } from 'antd-mobile'
import React from 'react'
import { useNavigate,NavLink } from 'react-router-dom'
const Home = () => {
     const city=localStorage.getItem("city") || []
    const navigate=useNavigate()
     const onFinish = (values) => {
        console.log(values);
     navigate("/list",{state:values})
  }
  return (
    <div>
      <NavBar left={<NavLink to="/city">{city}</NavLink>} backIcon={false}>首页</NavBar>
      <Form 
        onFinish={onFinish}
        footer={
          <Button block type='submit' color='primary' size='large'>
            查询
          </Button>
        }
      >
       <Form.Item name='start' label='开始'>
        <Input></Input>
       </Form.Item>
       <Form.Item name='end' label='结束'>
        <Input></Input>
       </Form.Item>
      </Form>
    </div>
  )
}

export default Home
